package table;

import org.eclipse.emf.ecore.EFactory;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

public class TableImport {
	private InstanceParser instance_parser;
	
	public TableImport(EObject root) {
		instance_parser = new InstanceParser(root);
	}
	
	public TableImport(String output_file, String extension, String uri, EPackage pack) {
		instance_parser = new InstanceParser(output_file, extension, uri, pack);
	}
	
	public void addFactory(EFactory factory) {
		instance_parser.addFactory(factory);
	}
	
	public void setRoot(String root) {
		instance_parser.setRoot(root);
	}
	
	public void loadInstance(String file, String ext, EPackage pkg) {
		instance_parser.loadInstance(file, ext, pkg);
	}
	
	public void loadTable(String file) {
		TableParser table = new TableParser(instance_parser);
		table.loadTable(file);
	}
	
	public void save() {
		instance_parser.save();
	}
}
